package cn.edu.zxj.rabbitmqmyself.mapper;

import cn.edu.zxj.rabbitmqmyself.model.info.ProblemInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-10-02
 * @time: 01:55:37
 */
@Mapper
public interface ProblemMapper {

    /*
     * 这个用来提供前端的列表展示
     */
    @Select("select problem_id,title,level from problem")
    List<ProblemInfo> selectAllProblems();

    /*
     * 这个用来提供前端的详情展示
     */
    @Select("select problem_id, title, level, description, template_code,test_case from problem where problem_id = #{problemId}")
    ProblemInfo selectProblemById(Integer problemId);

    // 增删改功能就不提供了
}
